import i18n from '@/utils/i18n'
export const formItems = [
  {
    filed: 'memberInfo',
    type: 'input',
    label: i18n.t('message.memberInfo'),
    placeholder: i18n.t('message.hy2'),
    clearable: true
  },
  {
    filed: 'time',
    type: 'daterange',
    clearable: true,
    pickerOptions: {
      disabledDate(time) {
        return time.getTime() < new Date(new Date().toLocaleDateString()).getTime()
      },
      shortcuts: [
        {
          text: i18n.t('message.jin7'),
          onClick(picker) {
            const end = new Date()
            const start = new Date()
            start.setTime(end.getTime() - 3600 * 1000 * 24 * 6)
            picker.$emit('pick', [start, end])
          }
        },
        {
          text: i18n.t('message.jin30'),
          onClick(picker) {
            const end = new Date()
            const start = new Date()
            start.setTime(end.getTime() - 3600 * 1000 * 24 * 29)
            picker.$emit('pick', [start, end])
          }
        },
        {
          text: i18n.t('message.jin60'),
          onClick(picker) {
            const end = new Date()
            const start = new Date()
            start.setTime(end.getTime() - 3600 * 1000 * 24 * 59)
            picker.$emit('pick', [start, end])
          }
        },
        {
          text: i18n.t('message.jin90'),
          onClick(picker) {
            const end = new Date()
            const start = new Date()
            start.setTime(end.getTime() - 3600 * 1000 * 24 * 89)
            picker.$emit('pick', [start, end])
          }
        }
      ]
    }
  },
  {
    filedStrt: 'minAmount',
    filedEnd: 'maxAmount',
    type: 'moneySelect',
    label: i18n.t('message.ddje'),
    start: i18n.t('message.ddzxje'),
    end: i18n.t('message.ddzdje'),
    clearable: true
  },
  {
    filed: 'type',
    type: 'select',
    label: i18n.t('message.txfs'),
    clearable: true,
    options: [
      { value: '0', label: i18n.t('message.wx') },
      { value: '1', label: i18n.t('message.zfb') },
      { value: '2', label: i18n.t('message.xj') }
    ]
  }
]
export const queryFormConfig = {
  formItems,
  online: true
}
